import React from 'react';
import { ConfigProvider } from 'antd';
import RouteMain from './route';
import { uiData } from '@store/index';
import '@assets/less/global.less';
import '@assets/template-pages/less/login-and-other.less';
import '@locales/config'; // 引用国际化切换配置文件
import 'antd/dist/antd.css';
import { constant } from '@config/index';
import { observer } from 'mobx-react-lite';
// import { initSentry } from './biz';
const { antdLanguage } = constant;

//初始化sentry
/*
initSentry({
    release: 'release.0.1.0',
    //自行判断是否生产环境
    isProd: location.href.includes('https://www.appProdtionDomain.com'),
    dsnProdKey: 'pleaseInputyour production dsn',
    dsnTestKey: 'please input your test dsn',
    //sentry其他配置扩展
    option: {},
});
*/

const App = () => {
    const locale = antdLanguage[uiData.language];
    return (
        <ConfigProvider locale={locale}>
            <RouteMain />
        </ConfigProvider>
    );
};

export default observer(App);
